home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / m_to_r / magicdem / api.doc next >
Encoding:
Text File  |  1996-09-15  |  3.6 KB  |  135 lines

  1.  
  2. **************************************************************
  3.     INTERRUPT 49H INTERFACE FOR MAGIC
  4. **************************************************************
  5.  
  6. This interface allows external programs to control MAGIC TSR.
  7. The default interrupt number is changable via command line switch 
  8. /Inn, e.g. /I64 would set interrupt 64 hex.
  9.  
  10. In order for caller to identify whether MAGIC holds the interrupt 49h,
  11. there is a 5 byte ID stored immediately preceeding the interrupt service. 
  12. The ID is: MAGic (case as shown). The ID string will not wrap around
  13. the segment boundaries, thus the offset of the interrupt vector must
  14. be at least 5.
  15.  
  16. The ID can be used to identify MAGIC and also to find which interrupt
  17. vector is used - the application can examine 256 interrupt vectors
  18. and check the 5 bytes preceeding the service routine. As an additional
  19. check, in the same segment -  at offset 0 there will be a standard
  20. CodeRunneR ID: RT followed by 4 byte TSR ID: VMAG (for VGA MAGIC).
  21.  
  22.  
  23.  
  24.     INT 49h OPERATIONAL CONVENTIONS
  25.  
  26.  1. Caller's registers AX,BX,CX,DX are modified.
  27.     Registers DS,ES,SI,DI,BP,SS,SP and Flags are preserved.
  28.  
  29.  2. Function number (1,2,..) is passed in AX register.  Any other 
  30.     arguments are passed in BX,CX,DX.
  31.  
  32.  4. Operation status is returned in AX. Any other return values
  33.     are passed in BX,CX,DX.
  34.  
  35.  5. The following return status values (AX) are common to all
  36.     functions:
  37.  
  38.     -1    TSR was busy, try same call later
  39.     -2    Invalid function number
  40.     -3    Function works only in magnified mode
  41.  
  42.  6. Horizontal (X) and vertical (Y) coordinates or sizes are passed
  43.     (or returned) in registers DX for X and BX for Y.
  44.  
  45.  7. The coordinates/sizes are measured in the same units as
  46.     those used by VGA hardware:
  47.  
  48.     a) In graphics modes
  49.  
  50.     X: 8 pixel units
  51.     Y: 1 pixel units
  52.  
  53.     b) Text modes
  54.  
  55.     X: character columns
  56.     Y: character lines
  57.  
  58.     All coordinates are 0 based, sizes are 1 based.
  59.  
  60.     
  61.  8. Interrupts are enabled during command execution and any other
  62.     MAGIC operations are locked out.
  63.  
  64.  
  65. *************************************************************************
  66.         FUNCTIONS
  67. *************************************************************************
  68.  
  69.  
  70. --01-- Magnify ON
  71.  
  72. ENTRY:    AX = 1
  73. EXIT:   AX = 0    Cannot magnify in current video state
  74.        = 2    Magnified in text mode
  75.        = 3    Magnified in graphics mode
  76.  
  77. --02-- Magnify OFF
  78.  
  79. ENTRY:    AX = 2
  80. EXIT:    AX = *    Same as function 1
  81.  
  82.  
  83. --03-- Capture screen point (e.g. mouse cursor)
  84.  
  85. ENTRY:    AX = 3
  86.     DX = X
  87.     BX = Y
  88.  
  89. EXIT:    AX = 0    Ok
  90.  
  91.     Specified X,Y point is made part of magnified window. No window
  92.     movement is done is the point is already within the window.
  93.  
  94.  
  95. --04-- Reposition magnified window
  96.  
  97. ENTRY:    AX = 4
  98.     DX = X of upper left corner
  99.     BX = Y of upper left corner
  100.  
  101. EXIT:    AX = 0    Ok
  102.  
  103.     Sets upper left corner of the magnified window to requested
  104.     coordinates. If the coordinates are outside of valid screen
  105.     boundaries, the nearest position is set.
  106.  
  107.  
  108. --05--  Get position of magnified window
  109.  
  110. ENTRY:    AX = 5
  111. EXIT:    AX = 0    Position in DX,BX is valid only if AX is 0.
  112.     DX = X
  113.     BX = Y
  114.  
  115.  
  116. --06--  Get full screen size (valid only in magnified mode)
  117.  
  118. ENTRY:    AX = 6
  119. EXIT:    AX = 0    Sizes in DX,BX is valid only if AX is 0.
  120.     DX = Horizontal size
  121.     BX = Vertical size
  122.  
  123.  
  124. --07--  Get magnified window size
  125.  
  126. ENTRY:    AX = 7
  127. EXIT:    AX = 0    Sizes in BX,DX is valid only if AX is 0.
  128.     DX = Horizontal size
  129.     BX = Vertical size
  130.  
  131.     The sizes returned are always smaller or equal than those
  132.     of full screen (equal only in modes where no magnification
  133.     is possible).
  134.  
  135.